<!--<?php
print <<<EOT
-->

<script src="css/edit.js"></script>
<script>
<!--

function addCart(id) {

    var str = 'buy_num_form_'+id;
    var buy_num = document.getElementById(str).value;
    var fitemid = $("#selFinish"+id).val();
     if(fitemid == 0 && $("#selFinish"+id).children().size() > 1)
    {
        alert('Please select a finish!');
        $("#selFinish"+id).focus();
        return false;
    }
    else if (!IsNumber(buy_num)) {
        alert('Please enter the order qty !');
        return false;
    } else {
        url = "cart_view.php?act=add&inventorytype=0&inventoryid=0&pid="+id+"&js=1&addnum="+buy_num+"&fitemid="+fitemid;;
        document.getElementById('addtocontentiframe').src=url;
    }

}

//-->
</script>
 <div class="main_R">  
          <div class="tb-top-logo">
           <img src="css/images/about_jansen_furniture.jpg" alt="" />
            </div>
              <div class="right-pad">   
             
                  
                  <table width="745" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                      <td width="730">                     
                     
                        <table width="730" border="0" cellspacing="0" cellpadding="0">                         
                          <tr>
                            <td align="center" class="pageTitleText">{$page_show['str']}</td>
                          </tr>
                          <tr>
                            <td align="center" class="pageListings">{$page_show['pagelink']}</td>
                          </tr>
                        </table>
                        <div><img name="" src="./images/spacer.gif" width="538" height="5" alt=""></div></td>
                      <td  width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>                      
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="2" alt=""></td>
                      <td  background="./images/colour/jf_colour_navy_15.gif" align="left" valign="top" height="1" colspan="4"><img name="" src="./images/colour/jf_colour_navy_07.gif" width="1" height="1" alt=""></td>
                      <td width="4"><img name="" src="./images/spacer.gif" width="4" height="2" alt=""></td>
                    </tr>
                  </table>
                  
                  <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>
                  <table width="745" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                      <td bgcolor="FFFFFF" width="538"><img name="" src="./images/spacer.gif" width="538" height="10" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                     
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="245" alt=""></td>
                      <td bgcolor="FFFFFF" width="730" class="text" align="left" valign="top">
                        
                        <table width="730" border="0" cellspacing="0" cellpadding="0" align=center>
			    	      <tr>
			    	        <td class=titles vAlign=center align=left width=80 height=20>&nbsp;</td>
			                <td class=titles vAlign=center align=middle width=10 height=20><!--List--></td>
			                <td class=titles vAlign=center align=left width=400 height=20 colspan=2>Product Details</td>
			                <td class=titles vAlign=center align=right colSpan=3 height=20>Actions</td>
			              </tr>
   
<!--
EOT;
$index = 1;
foreach ($product_ary as $v) {
    if (trim($v['small_pic']) == "" || !file_exists("./attachments/" . $v['small_pic'])) {
        $v['small_pic'] = 'no_113.gif';
    }
    $v['width']   = number_format($v['width'], 2, '.', ',');
    $v['length']  = number_format($v['length'], 2, '.', ',');
    $v['height']  = number_format($v['height'], 2, '.', ',');
    $v['width2']  = number_format($v['width2'], 2, '.', ',');
    $v['length2'] = number_format($v['length2'], 2, '.', ',');
    $v['height2'] = number_format($v['height2'], 2, '.', ',');
    $v['cbm']     = number_format($v['cbm'], 2, '.', ',');
    $v['cuft']    = number_format($v['cuft'], 2, '.', ',');
       
print <<<EOT
-->   
			              <tr><td colspan=8 bgcolor="#000000" height=1></td></tr>
			              <tr><td colspan=8 height=5></td></tr>
			    	      <tr vAlign="top">
			    	        <td class=text align=left ><a onclick="return confirm('Do you really want to remove this from your wish list?')" href="wishlist_details_view.php?act=delone&wid=$wid&pid={$v['id']}"  onmouseover="jf_button_remove_{$v['id']}.src='./images/button/jf_button_remove-over.gif'" onmouseout="jf_button_remove_{$v['id']}.src='./images/button/jf_button_remove.gif'" ><img src="./images/button/jf_button_remove.gif" alt="Remove This Item From Your Wish List" name="jf_button_remove_01" width="50" height="13" border="0" id="jf_button_remove_{$v['id']}"></a></td>
			                <td class=text align=middle>&nbsp;</td>
			                <td class=text align=left width=113><a href="product_details.php?pid={$v['id']}#atpic"><IMG class=picture height=113 alt="Image of {$v['code']}" src="./attachments/{$v['small_pic']}" width=113 border=0></a></td>
			                <td class=text align=right >
			                <table cellpadding="0" cellspacing="2" border="0" width="85%" class="tb-size">
			                <tr>
			                <td width=3%></td>
			                <td colspan=5 class="pageTitleText">{$v['code']}</td>
			                </tr>			                
			                <tr>
			                <td width=3%></td>
			                <td width=20%><STRONG>W:</STRONG></td>
			                <td width=12% align="right">{$v['width']}</td>
			                <td><STRONG>[cm]</STRONG></td>
			                <td align="right">{$v['width2']}</td>
			                <td><STRONG>[inch]</STRONG></td>
			                </tr>
			                
			                <tr>
			                <td width=3%></td>
			                <td width=20%><STRONG>D:</STRONG></td>
			                <td width=12% align="right">{$v['length']}</td>
			                <td><STRONG>[cm]</STRONG></td>
			                <td align="right">{$v['length2']}</td>
			                <td><STRONG>[inch]</STRONG></td>
			                </tr>
			                
			                <tr>
			                <td width=3%></td>
			                <td width=20%><STRONG>H:</STRONG></td>
			                <td width=12% align="right">{$v['height']}</td>
			                <td><STRONG>[cm]</STRONG></td>
			                <td align="right">{$v['height2']}</td>
			                <td><STRONG>[inch]</STRONG></td>
			                </tr>
			                
			                
			                <tr>
			                <td width=3%></td>
			                <td width=20%><STRONG>Cbm:</STRONG></td>
			                <td align="right">{$v['cbm']}</td>
			                <td colspan=3></td>
			                </tr>
			                
			                <tr>
			                <td width=3%></td>
			                <td width=20%><STRONG>Cuft:</STRONG></td>
			                <td align="right">{$v['cuft']}</td>
			                <td colspan=3></td>
			                </tr>
			                
			                
			                
			                </table>			                 
			                </td>
			                <td class=text align=right colSpan=3 valign="bottom" width="160">
			                  <table cellpadding="0" cellspacing="0" width="160">
			                 
			                  <tr>
			                  <td width="40">Order</td>
			                  <td heihgt="25"><strong>Qty</strong></td>
			                  <td>:</td>
			                   <td align="right">
			                     <div><input type=text size=4 name="buy_num_form_{$v['id']}"  id="buy_num_form_{$v['id']}" style="width:75px;height:17px; padding:0; margin:0;"></div>
			                </td> 
			                </tr>
			                <tr><td></td>
			                    <td height="25"><strong> Finish</strong></td>
                                      <td width="5" align="center"> :</td>
                                      <td align="right"><select style="width: 75px;height:17px; padding:0; margin:0;" id='selFinish{$v["id"]}' name='selFinish{$v["id"]}'>{$_finish[$v["finish_id"]]}</select></td>
                                  </tr>
			                </table>
			                <br/>			              
			                <a href="javascript:;"  onclick="addCart('{$v['id']}')"  onMouseOver="MM_swapImage('jf_button_add_to_cart_{$v['id']}','','./images/button/jf_button_add_to_container-over.gif',1)" onmouseout="MM_swapImgRestore()">
			                <img src="./images/button/jf_button_add_to_container.gif" alt="Add to Container" name="jf_button_add_to_cart_{$v['id']}" width="120" height="20" border="0" align="absmiddle" id="jf_button_add_to_cart_{$v['id']}">
			                </a>
			                
                            
			                </td>
			    	      </tr>
			    	      
			    	      <tr><td colspan=8 height=5></td></tr>

<!--
EOT;
    $index++;
} 
print <<<EOT
-->     	 
    	                   
    	    			</table>
                      
                      </td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="245" alt=""></td>
                     
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                      <td bgcolor="FFFFFF" width="538"><img name="" src="./images/spacer.gif" width="538" height="10" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                     
                    </tr>                    
                   </table>                  
                  
                   <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>
                   <iframe name='addtocontentiframe' width=0 height=0 src="about:blank" id='addtocontentiframe' style="display:none" ></iframe>
                   
                   
                   <table width="745" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td width="10"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td width="730">
                      <table width="730" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td   align="center" class="pageListings"> &nbsp;&nbsp;{$page_show['pagelink']}</td>
                          </tr>
                        </table>
                        </td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>                      
                    </tr>
                   
                  </table>                  
                  <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>                  
                  <div><img name="" src="./images/spacer.gif" width="10" height="2" alt=""></div>
                
           </div>
          </div>  	
	   </div>
	
             
        
<!--
EOT;
?>-->